1. Field of the Invention
This invention relates to an image-signal decoding apparatus, and more particularly to an image-signal decoding apparatus that decodes an image transmitted or recorded after high-compression coding.
2. Description of the Related Art
When moving-picture signals from a solid-state imaging device such as a CCD, are recorded as digital data to a recording device such as a magnetic disk or a magnetic tape, the amount of data is very large. Thus, to record those signals in a limited memory capacity, it is necessary to compress the obtained image-signal data very effectively in a suitable manner.
A typical moving-picture compression system is a method in which high compression is achieved using interframe correlation, as proposed by ISO. This method will be explained briefly, referring to FIG. 12.
FIG. 12 is a block diagram of a conventional moving-picture compression system employing interframe correlation. In the figure, a predictive error signal from which a motion-compensated interframe predictive image is subtracted at a differential circuit 1, undergoes DCT (Discrete Cosine Transform) in blocks at a DCT circuit 2, and is then quantized at a quantizing circuit 3. Further, the quantization result is assigned codes of variable length at an encoder 4 and then recorded. The quantization result is also decoded by an inverse quantizing circuit 5 and an inverse DCT circuit 6, and then added with the motion-compensated interframe predictive image at an adder circuit 7. Next, a moving vector is obtained at a motion compensation predicting circuit 8 that contains an image memory having a variable delay function for compensating motion, and then a motion-compensated interframe predictive image for a subsequent frame is formed.
Such a series of processes is repeated until all frames are compressed. Their differential is not always encoded but the input image itself is sometimes encoded. The latter is called an I picture. There are the following two types of predictive error image.
One of them is called a P picture, which is the differential between an image to be encoded and an image previously encoded from the preceding I picture or P picture. In practice, the more efficient is used of a method of coding the difference from the motion-compensated predictive image and a method of coding without computing the differential or intra-coding.
The other is called a B picture, which is obtained by the most efficient among the coding and the intra-coding of three kinds of the difference between an image to be encoded and the preceding or the following image, or the interpolation image created from the preceding and following images. This prediction system allows switching in blocks with select information added to the code as a block type.
For the signal from which redundancy on the time axis is reduced by compensating for motion and computing the differential between images, DCT and a variable-length code are used to decrease redundancy with respect to space. A coding method using orthogonal transform such as DCT is widely used in compressing still pictures. This system will be explained hereinafter, referring to FIG. 13.
FIG. 13 is an explanatory diagram for the operation of compressing still pictures by a coding method using DCT. First, when a signal f from which redundancy on the time axis has already been decreased is supplied (101), the input image data f is divided into blocks f.sub.b of a specified size (102), and each block is subjected to two-dimensional DCT as orthogonal transform for conversion into F (103). Next, linear quantization is carried out according to each frequency component (104), and this quantized value FQ undergoes Huffman coding as variable-length coding (105). The result is then transmitted or recorded as compressed data C. At this time, the quantization width in the linear quantization is determined by preparing a quantizing matrix indicating a relative characteristic taking into account the visual characteristic for each frequency component and then multiplying the quantization matrix by a constant.
On the other hand, when image data is reproduced from compressed data, the quantized value FQ of a transform coefficient is obtained by decoding the variable-length code (C) (106). It is impossible, however, to obtain the true value F before quantization from this value, and the result from inverse quantization is consequently F' containing errors (107). Thus, this value (F') is subjected to IDCT (Inverse Discrete Cosine Transform) (108), and the resulting value (f.sub.b) is inverse-blocked (109), which permits the obtained image data f' to contain errors as well.
Therefore, the reproduced image f' from the image reproduction apparatus (110) is poorer in picture quality. That is, errors in the value (F') of the result of the inverse quantization are ascribed to the cause of poorer picture quality of the reproduced image (f') as quantization errors.
More specifically, the input image data is first divided into blocks of a specified size (for example, blocks of 8.times.8 pixels). Each block is subjected to two-dimensional DCT as orthogonal transform and the resulting data is stored on an 8.times.8 matrix in sequence.
Image data, when seen in a two-dimensional plane, has a spatial frequency which is frequency information based on the distribution of shading information. Therefore, the DCT converts the image data into a direct-current (DC) component and alternating-current (AC) components. The data indicating the value of the DC component is stored in the position of the origin, or position (0,0), on the 8.times.8 matrix. Further, the data indicating the maximum frequency value of the AC components on the abscissa is stored in position (0,7); the data indicating the maximum frequency value of the AC components on the ordinate is stored in position (7,0); and the data indicating the maximum frequency of the AC components in a diagonal direction is stored in position (7,7). In each intermediate position, the frequency data in the direction related to each coordinate position is stored in such a manner that the higher-frequency data appears in sequence, starting on the origin side.
Next, by dividing the stored data in each coordinate position on the matrix by the quantization width for each frequency component, linear quantization is carried out according to each frequency component. The quantized value is subjected to Huffman coding for variable-length coding. At this time, for the DC component, the differential value between the DC component and those of adjacent blocks is subjected to Huffman coding. For the AC components, scanning from low to high frequencies called zigzag scanning is done to perform Huffman coding of the number of consecutive invalid components (whose value is zero), or the number of consecutive 0s, and the values of components that follow. The result is used as data.
In this method, the compression rate is generally controlled by changing the quantization width. The higher the compression rate, the greater the quantization width. This makes a quantization error greater, resulting in noticeable degradation of quality of the reproduced image.
This quantization error in a transform coefficient tends to appear as so-called block distortion where discontinuities occur in the boundary between blocks in the reproduced image, or mosquito noise where a fog takes place in a flat portion near the edge. Since those distortions are visually noticeable, this gives a bad impression even if signal-to-noise ratio is good.
To overcome this drawback, a method has been worked out which permits the image reproduced by an encoder to pass through a low-pass filter for eliminating distortions. The filter, however, has the disadvantage of blurring the edges when they are in the image, although being able to eliminate distortion relatively well, of being unable to eliminate block distortions completely if the low-pass band is loosened in order to decrease the blurring.
To cope with those disadvantages, in a known method, the presence and absence of edges and distortions in the image are sensed, and based on the result, whether a filter is used or not is determined, and then only distorted portions are allowed to pass through the filter.
A conventional method of eliminating distortions as described above, however, still has the disadvantage of blurring the image. In addition, the conventional method requires the calculation of the amount of block distortion and consequently a longer processing time, with the result that the size of circuitry and power consumption are extremely large. Therefore, it is difficult to apply the above-mentioned system to a product that needs compactness and high-speed operation, particularly a product handling moving pictures.